package demo4;
class Teacher{
    String teacherID;//教师编号

    /**
     * 关键字this
     * 关键字static
     */
    /**
     * 类属性 每个对象都可以继承（）
     * 使用静态属性 static
     */
    String dep = "信息工程系";
    public static String like = "健身"
    public Teacher(String teacherID){
        // 当形参名称和类属性一致时 分不请 函数认为是形参名称
       // teacherID = teacherID;
        /**
         * 使用this之类本身
         * 无关键字是形参 有关建字this是类本身
         * this也可以调用本函数内部其他属性和方法
         */
        this.teacherID = teacherID;
    }
    public String getTeacherID(){
        return teacherID;
    }
    public volid setTeacherID(String teacherID){
        // 修改teacher类teacherID属性
        this.teacher=teacherID;
    }
}
public class a {
  Teacher t1 = new Teacher(s:"2023s2004")
     Teacher t2 = new Teacher(s:"2023s2001");
  System.out.println(t1.dep);
  System.out.println(t2.dep);
  System.out.println("**********");
  t1.dep = "宇宙系";
            System.out.println(t1.dep);
            System.out.println(t2.dep);
            System.out.println("静态属性");
            System.out.println(t1.hobby);
            System.out.println(t2.hobby);
            t2.hobby = "美的设计";
            System.out.println("******");
            System.out.println(t1.hobby);
            System.out.println(t2.hobby);
}